<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCashGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cash_goods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('goodname', 20)->comment('兑现商品名称');
            $table->decimal('integralamount', 16, 2)->comment('兑现积分数量');
            $table->string('number')->comment('兑现码');
            $table->integer('shopid')->comment('兑现商家id');
            $table->integer('cashnumber')->comment('兑现数量');
            $table->dateTime('starttime')->comment('兑现开始时间');
            $table->dateTime('endtime')->comment('兑现结束时间');
            $table->tinyInteger('status')->comment('兑现状态');
            $table->string('info', 256)->nullable()->comment('预留字段');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('cash_goods');
    }
}
